printeroptionwidget: Avoid a critical
authorMatthias Clasen <mclasen@redhat.com>
Mon, 11 May 2020 18:26:31 +0000 (14:26 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 11 May 2020 18:26:31 +0000 (14:26 -0400)
The new_location can be NULL, as we clearly
knew earlier in the function. We've forgotten
about that by the time we unref it :(

gtk/gtkprinteroptionwidget.c

index 7cff48186d6c555fd6413689fd6acfd9fed6a7d9..c291fe3ec2e72cf6d672f8ad210a4d205568a77f 100644 (file)
@@ -526,7 +526,7 @@ dialog_response_callback (GtkDialog              *dialog,
       g_free (uri);
     }
 
-  g_object_unref (new_location);
+  g_clear_object (&new_location);
   g_clear_object (&priv->last_location);
 
   /* unblock the handler which was blocked in the filesave_choose_cb function */